//
//  FotoNou.m
//  iDent
//
//  Created by Marius Corega on 6/15/09.
//  Copyright 2009 Marius Corega. All rights reserved.
//


#import "Controller.h"


@implementation Controller (Login)

-(IBAction) showLogin:(id)sender
{
	[NSApp beginSheet:loginWindow modalForWindow:window modalDelegate:self didEndSelector:@selector(loginWindowSheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
}



- (void)loginWindowSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode  contextInfo:(void  *)contextInfo
{	
	if ((returnCode == NSOKButton) && (loginWindow != nil))
	{
		
		
		
	}
	
	[loginWindow orderOut:self];
	return;
}

-(IBAction) login:(id)sender
{
	if ([self login])
		[NSApp endSheet:loginWindow returnCode:NSOKButton];

}




@end
